\documentclass[]{article}

\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{xfrac}

%\usepackage{hyperref}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{amsthm}
\usepackage{bigstrut}
\usepackage[margin=1in]{geometry}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{color}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{cancel}

\theoremstyle{definition}% default plain
\newtheorem{thm}{Theorem}
\newtheorem{prop}{Proposition}
\newtheorem{cor}{Corollary}
\renewcommand{\qedsymbol}{$\blacksquare$}
\newtheorem{lem}{Lemma}
\newtheorem*{notation}{Notation}

\theoremstyle{definition}
\newtheorem*{defn}{Definition}
\newtheorem{conj}{Conjecture}
\newtheorem{exmp}{Example}
\newtheorem{note}{Note}
\newtheorem{obs}{Observation}
\newtheorem{ass}{Assumption}
\newcommand{\Gbar}{\overline{G}}
\newcommand{\Hbar}{\overline{H}}
\newcommand{\Fbar}{\overline{F}}
\newcommand{\Ex}{\mathbb{E\/}}


\begin{document}
\bibliographystyle{authordate1}


\section{Problem Statement}
Consider a patient who is under hemo-dialysis (HD), does not have an AVF access, and has at least one AVF chance left, and thus AVF creation is under consideration. We want to answer the following question:\\

\begin{center}
``In order to maximize patient's expected total lifetime, what is the optimal AVF referral policy?''
\end{center}

Intuitively, one would think that based on AVF's better survival and quality, it is best to refer patient as soon as possible. Using empirical data, we observed the followings about the survival rate of HD on AVF versus CVC, based on which we will develop our main theorem that support this intuitive hypothesis.

\begin{obs}
Let $\overline{H}(t)$ and $\overline{G}(t)$ denote survival probabilities of a patient doing HD on AVF and CVC, respectively. HD on CVC has a higher failure rate than on AVF at all ages. In mathematical words,
\begin{align} \label{obs:relative}
 \forall t: \frac{h(t)}{\overline{H}(t)} \le \frac{g(t)}{\overline{G}(t)}.
\end{align}
\end{obs} 

\begin{obs}
Hazard rate of HD on CVC and AVF are increasing in age. In other words, 

\begin{align} \label{obs:increasing}
\frac{h(t)}{\overline{H}(t)} , \frac{g(t)}{\overline{G}(t)} \uparrow t .
\end{align}

\end{obs} 
\begin{obs}
The difference in performance of HD on AVF vs. CVC diminishes as patient ages. More specifically, the difference of hazard rates of HD on CVC versus AVF is decreasing in time, i.e. 
\begin{align} \label{obs:converging}
0 \le  \frac{g(t)}{\overline{G}(t)} - \frac{h(t)}{\overline{H}(t)}=
\frac{g\overline{H}-h\overline{G}}{\overline{G}\overline{H}}  \Big|_{t} \downarrow t .
\end{align}

\end{obs} 



Since AVF has a better survival outcome than CVC, and that this difference of survival decreases as patient ages, to get the most out of an existing AVF chance, intuitively one would think that we need to use the chance as soon as possible. Theorem \ref{thm:main} formalizes this hypothesis. We have the following assumption about using an AVF until its failure time, which dictates the decision time-points.
\begin{ass}
A patient cannot start an AVF creation while a working AVF exist; in other words, the only time AVF creation is under consideration is when a patient has just started HD with CVC, or when a working AVF has just failed. Although it might be optimal to create a new AVF when the old one is approaching the end of its lifetime, from the patient perspective this is infeasible and thus not considered here.
\end{ass}

\begin{thm}[main theorem] \label{thm:main}
In order to maximize patient's expected total lifetime, we need to refer patient for AVF creation as soon as the patient starts HD (if not referred earlier), or once an existing AVF fails, provided there is at least one AVF chance left, and properties \ref{obs:relative}-\ref{obs:converging} hold.
\end{thm}

In order to prove the main theorem, we start by a simpler case in which there is just one AVF chance left. We prove that patient's expected total lifetime decreases monotonically as we delay referral. The proof of main theorem is delayed until we prove some preliminary results.

\section{Especial case of single AVF chance} \label{sec:especial}
Consider the especial case which patient has just one AVF chance left, and AVF referral is under consideration. We want to prove that patient's expected total lifetime decreases monotonically as we delay referral. In order to make the proof easier, we proceed by adding two assumptions to the problem. We later prove that the result holds when these assumptions are relaxed. The assumptions are as follows:
\begin{itemize}
\item We can switch to AVF at any  time we desire (this is not a realistic assumption because of the stochastic maturation and wait time for surgery). Note that we still assume a failure chance for AVF surgery success.
\item The lifetime of AVF is fixed, deterministic and known a priori (again unrealistic, since the lifetime of AVF is stochastic).
\end{itemize}
Before stating our propositions, we define model parameters and the decision variable in the following section.

\subsection{Model parameters and the decision variable}
\begin{itemize}

\item $u$: time to switch to AVF (decision variable) 
\item $L(u)$: patient's total lifetime if we switch to AVF at time $u$ (the objective function to be maximized)
\item $p$: AVF creation success probability 
\item $f$: AVF's [deterministic] lifetime
\item $t_0$: patient age at the moment of decision
\item $t$: time calculated with respect to $t_0$
\item $C$: Patient's lifetime on CVC (r.v.) 
\item $g(t)$: PDF of patient's lifetime having HD on CVC 
\item $\overline{G}(t)$: Patient's survival when having HD on CVC 
\item $A$: Patient's lifetime on AVF (r.v.) 
\item $h(t)$: PDF of patient's lifetime having HD on AVF 
\item $\overline{H}(t)$: Patient's survival when having HD on AVF 
\end{itemize}
\subsection{Objective function}
Assume that we decide to switch to AVF at time $u$. As a result, there are three phases for patient's HD:

\begin{itemize}
\item Phase 1: HD on CVC in the interval $[0,u)$.
\item Phase 2: HD on AVF in the interval $[u,u+f)$.
\item Phase 3: HD on CVC in the interval $[u+f, \infty)$.
\end{itemize}
A patient will go from one phase to the next or may die any time in between, depending on model parameter and the decision variable (see figure \ref{fig:fig1}).
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.6]{./files/fig1}
\caption{$L(u)$ and HD phases}
\label{fig:fig1}
\end{figure}

Based on these phases, the objective function $L(u)$, which is patient's remaining lifetime from $t_0$, can be calculated according to equation \ref{eq:obj}.
\begin{align} \label{eq:obj}
L(u)=& \int\limits_{0}^{u}tg(t)dt
+ p.\frac{\overline{G}(u)}{\overline{H}(u)} \left [\int\limits_{u}^{u+f}th(t)dt+
\frac{\overline{H}(f+u)}{\overline{G}(f+u)} \int\limits_{u+f}^{\infty}tg(t)dt \right ]
+(1-p)\int\limits_{u}^{\infty}tg(t)dt 
\end{align}
Now that we have defined the objective function, we can state the following proposition which establishes the monotonicity of the expected lifetime (i.e. $L(u)$) in the referral time (i.e. $u$) under mentioned assumptions. Later in theorem \ref{thm:AVFchance}, we prove the same result with assumptions lifted.
\begin{prop} [main proposition] \label{pro:mainpro}
Function $L(u)$ defined in equation \ref{eq:obj} is decreasing in $u$ provided that properties \ref{obs:relative}-\ref{obs:converging} hold. Furthermore, if $f=\infty$, properties \ref{obs:relative}-\ref{obs:increasing} suffice for the result to hold.
\end{prop}
The proof of this proposition has three parts. We first prove this for the specific case of $f=\infty$. Then in order to prove that $\frac{d L}{d u} \le 0 $ under $f < \infty$, we first prove that $\forall u: \frac{\partial L}{\partial u} \big |_{f=0}=0$. Then we prove $\frac{\partial^2 L}{\partial u \partial f} \le 0$. These two will establish the result we want.\\

Before proving these different sections, we prove a lemma that will be used in different parts of the proof.

\begin{lem} [bounds on the remaining lifetime] \label{lem:bound} Consider a part with increasing hazard rate (i.e. $\frac{f(t)}{\overline{F}(t)} \uparrow t $). Then the expected remaining life of the component conditional on its survival up to time $t$, defined in the following
\begin{align*}
R(t)=\frac{\int\limits_{t}^{\infty} xf(x) dx}{\overline{F}(t)}
\end{align*}
satisfies the following inequalities:

\begin{align}
t \le R(t) \le t+ \frac{\overline{F}(t)}{f(t)}
\end{align}
\end{lem}
\begin{proof}[Proof of $t \le R(t)$] 
~\\
\begin{align*}
\int\limits_{t}^{\infty} xf(x) dt \ge \int\limits_{t}^{\infty} tf(x) dx=t\overline{F}(t) \Rightarrow R(t) \ge \frac{t\overline{F}(t)}{\overline{F}(t)}=t.
\end{align*}
\end{proof}
\begin{proof}[Proof of $R(t) \le t+ \dfrac{\overline{F}(t)}{f(t)}$] 
~\\
First define a random variable $L$ on domain $[t, \infty)$ with PDF defined as $$\frac{f(x)}{\overline{F}(t)}: t \le x.$$
The failure rate of $L$ can be calculated as  $\frac{f(x)}{\Fbar(x)}$, and thus is increasing. Also, define an exponential random variable $X$ with rate $\lambda= \frac{f(t)}{\overline{F}(t)}$. Note that $L \le_{hr} t+X$. According to \cite{shaked2007stochastic}, $$L \le_{hr} t+X \implies L \le_{st} t+X.$$
As a result, $\Ex [L] \le \Ex [ t+X]=t+\dfrac{1}{\lambda}=t+\dfrac{\Fbar(t)}{f(t)}$.
\end{proof}


\begin{lem} [bounds on the residual lifetime] \label{lem:residual} Consider a part with increasing hazard rate (i.e. $\frac{f(t)}{\overline{F}(t)} \uparrow t $). Then the expected residual life of the component, defined as follows
\begin{align*}
	r(t)=t-R(t)=t-\frac{1}{\overline{F}(t)} \int\limits_{t}^{\infty}xf(x)dx,
\end{align*}
is always negative and increasing in time.
\end{lem}

\begin{proof} [Proof of lemma \ref{lem:residual}]
~\\ The negativity follows directly from lemma \ref{lem:bound} as follows:
\begin{align*}
	r(t)=t-\frac{1}{\overline{F}(t)} \int\limits_{t}^{\infty}xf(x)dx \le t - \frac{1}{\overline{F}(t)}.\overline{F}(t)t=0.
\end{align*}
We prove the increasing property by showing that $\frac{d R(t)}{d t} \ge 0$ as follows:
\begin{align*}
	\frac{d r(t)}{d t}&=1-\frac{f(t)}{\overline{F}^2(t)}\int\limits_{t}^{\infty}xf(x)dx+\frac{1}{\overline{F}(t)}.tf(t)\\
	& \ge 1-\frac{f(t)}{\overline{F}^2(t)}\left[\overline{F}(t)(t+\frac{\overline{F}(t)}{f(t)})\right]+\frac{1}{\overline{F}(t)}.tf(t)=0
\end{align*}
The last inequality follows from lemma \ref{lem:bound}.
\end{proof}



\begin{proof} [Proof of proposition \ref{pro:mainpro}: case $f=\infty$]
~\\
First, we simplify the equation \ref{eq:obj} for this special case as follows:
\begin{align} \label{eq:obj2}
L(u)=& \int\limits_{0}^{u}tg(t)dt
+ p\frac{\overline{G}(u)}{\overline{H}(u)} \int\limits_{u}^{\infty}th(t)dt
+(1-p)\int\limits_{u}^{\infty}tg(t)dt 
\end{align}
Now, we prove that $\frac{d L}{d u} \le 0 $ as follows:
\begin{align*} 
\frac{d L}{d u} =& ug(u)+p\frac{h\overline{G}-g\overline{H}}{\overline{H}^2}\big|_u\int\limits_{u}^{\infty}th(t)dt-p\frac{\overline{G}(u)}{\overline{H}(u)}uh(u)-(1-p)ug(u)\\
&=p \left[ ug(u)+ \frac{h\overline{G}-g\overline{H}}{\overline{H}^2}\big|_u\int\limits_{u}^{\infty}th(t)dt-\frac{\overline{G}(u)}{\overline{H}(u)}.uh(u) \right] \\
& \le p \left[ ug(u)+ \frac{h\overline{G}-g\overline{H}}{\overline{H}^2}. u \overline{H}-\frac{\overline{G}(u)}{\overline{H}(u)}.uh(u) \right]=0
\end{align*}
The inequality follows from lemma \ref{lem:bound} and the fact that $\dfrac{h\overline{G}-g\overline{H}}{\overline{H}^2} \le 0$ according to property \ref{obs:relative}.
\end{proof}
\begin{proof} [Proof of proposition \ref{pro:mainpro}: $\frac{\partial U}{\partial u} \big |_{f=0}=0$]
~\\
If the lifetime of AVF is zero, no matter when we switch to AVF, we instantaneously switch back to CVC. Since all distributions are continuous and non-atomic, the lifetime of patient under all values of $u$ is the same. Mathematically, if $f=0$, the objective function simplifies as follows:
\begin{align*} \label{eq:obj3}
L(u)=& \int\limits_{0}^{u}tg(t)dt
+ p.\frac{\overline{G}(u)}{\overline{H}(u)} \left [\int\limits_{u}^{u}th(t)dt+
\frac{\overline{H}(u)}{\overline{G}(u)} \int\limits_{u}^{\infty}tg(t)dt \right ]
+(1-p)\int\limits_{u}^{\infty}tg(t)dt \\
&=\int\limits_{0}^{u}tg(t)dt+\int\limits_{u}^{\infty}tg(t)dt=\int\limits_{0}^{\infty}tg(t)dt= \Ex C
\end{align*}
As a result, $\frac{\partial L}{\partial u} \big |_{f=0}=0, \forall u$.
\end{proof}
\begin{proof} [Proof of proposition \ref{pro:mainpro}: $\frac{\partial^2 L}{\partial u \partial f} \le 0$]
~\\ 
To show $\frac{\partial^2 L}{\partial u \partial f} \le 0$, we start by calculating $\frac{\partial L}{ \partial f}$ as follows:
\begin{align}
\frac{\partial L}{ \partial f}=&
p  \frac{\overline{G}(u)}{\overline{H}(u)} \left[xh(x)+ \frac{g\overline{H}-h\overline{G}}{\overline{G}^2}\big|_x \int\limits_{u+f}^{\infty}tg(t)dt-\frac{\overline{H}(x)}{\overline{G}(x)}.xh(x)      \right]_{x=u+f}\\
=&p  \underbrace{ \frac{\overline{G}(u)}{\overline{H}(u)}  }_{A(u)}
\underbrace{ \left[ \frac{h\overline{G}-g\overline{H}}{\overline{H}\overline{G}}    \right]_{u+f} } _{B(u)}
\underbrace{ \left[ x-\frac{1}{\overline{G}(x)} \int\limits_{u+f}^{\infty}tg(t)dt   \right]_{x=u+f} }_{C(u)}
\underbrace{ \left[  \overline{H}(u+f)   \right]}_{D(u)}
\end{align}
Thus, we can calculate $\frac{\partial^2 L}{\partial u \partial f}$ as follows:
\begin{align}
\frac{\partial^2 L}{\partial u \partial f }=& p(A'BCD+ AB'CD+ABC'D+ABCD')\big|_u
\end{align}
To show $\frac{\partial^2 L}{\partial u \partial f} \le 0$, we prove that every single term in the parenthesis is negative by showing the followings: $A,D \ge 0$, $B,C \le 0$, and $A', D' \le 0$, $B', C' \ge 0$, for all $u$. By nature $A, D \ge 0$ and $D(u)=\overline{H} (f+u)$ is decreasing in $u$. Also, that $C \le 0$ and $C' \ge 0$ follows from lemma \ref{lem:residual}. Note that $B \le 0$, and $B' \ge 0$ following from property \ref{obs:relative}, and \ref{obs:converging}, respectively. It remains to prove that $A' \le 0$ as follows:
\begin{align}
A'(u)=\frac{h\overline{G}-g\overline{H}}{\overline{H}^2}=\frac{\overline{G}(u)}{\overline{H}(u)}
\left [\frac{h(u)}{\overline{H}(u)}-\frac{g(u)}{\overline{G}(u)} \right] \le 0
\end{align}
where inequality follows from property \ref{obs:relative}.
\end{proof}

\begin{prop} \label{pro:stochf}
The result of proposition \ref{pro:mainpro} holds under a stochastic lifetime for AVF (i.e. when variable $f$ is stochastic).
\end{prop}
\begin{proof}
We prove that $\Ex L(u)$ is decreasing in $u$ (where expectation is with respect to the random variable $f$) as follows:
\begin{align*}
\frac{d \Ex L(u)}{d u} = \Ex \frac{d L(u)}{d u} \le 0.
\end{align*}
\textcolor{red}{Note to selves: We need to justify the interchange of order of integration and differentiation here.}
\end{proof}
\begin{thm} \label{thm:AVFchance}
In order to maximize patient's total life, we need to refer patient for AVF creation as soon as the patient starts HD (if not referred earlier), or once an existing AVF fails, provided there is exactly one AVF chance left, and properties \ref{obs:relative}-\ref{obs:converging} hold.
\end{thm}
\begin{proof}
In the proposition \ref{pro:stochf}, we proved that patient's total lifetime is decreasing in the time we would like to switch to AVF (i.e. $u$). Since there is a lead-time from when we refer a patient for AVF creation, until the time the AVF is mature to support HD (if the surgery is successful), any delay in referral would result in later switch time which will in turn decrease expected lifetime. Thus, the best time to refer for AVF creation is at time zero.
\end{proof}

{\color{red} 
Note to myself: If $\forall f: \arg\max A(x|f)=x_0$. Then $\arg\max \Ex A(x)=x_0$. In other words, if the optimal decision under all possible values of a random variable is the same, then the decision for optimizing the expected value is that same decision. As an application, we could have instead proven that $\forall f: u^*=0$. \\
}

\section{Bridge to the multi-chance case}
In this section, we prove proposition \ref{thm:main} in a stronger sense. We prove that patient's total lifetime decreases monotonically as we delay referral but in the stochastic order sense, not only the expected value sense. This proposition also paves the way to prove the multi-chance case.
Define $X(u)$, a random variable describing patient's total lifetime when we switch to AVF at time $u$ (see figure \ref{fig:fig2} for an illustration). Assume that a patient has one AVF chance left, and that the two assumptions stated in the beginning of section \ref{sec:especial} hold. Then, we have the following proposition.
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.6]{./files/fig2}
\caption{$X(u)$ for $u_1$ and $u_2$}
\label{fig:fig2}
\end{figure}

\begin{prop}\label{pro:incr}
Random variable $X(u)$ is decreasing in $u$. In other words, 
$$u_1 \le u_2 \implies X(u_2) \le_{st} X(u_1).$$
\end{prop}
\begin{cor}
Expected value of $X(u)$ previously denoted by $L(u)$ is decreasing in $u$.
\end{cor}
In order to prove proposition \ref{pro:incr}, we first prove the following lemma. This lemma proves that with the goal of maximizing the probability of survival until a certain point, the optimal decision is to use AVF in the beginning of the time-interval; i.e. the optimal sequence is AVF, and then CVC.
\begin{lem}\label{lem:sequence}
Consider figure \ref{fig:fig3}, and define $S(x)$ as the probability of survival until time $u$ when we switch to AVF at time $x$ (for $f\le u$, and $0 \le x \le u-f$). The function $S(x)$
is decreasing in $x$ for all values of $f$. 
\end{lem}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.6]{./files/fig3}
\caption{$S(x)$}
\label{fig:fig3}
\end{figure}

\begin{proof}[Proof of lemma \ref{lem:sequence}]
We can calculate $S(x)$ as follows:
\begin{align*}
S(x)= \overline{G}(x).\frac{\overline{H}(x+f)}{\overline{H}(x)}\frac{\overline{G}(u)}{\overline{G}(x+f)}=
\frac{\dfrac{\overline{G}(x)}{\overline{H}(x)}}{\dfrac{\overline{G}(x+f)}{\overline{H}(x+f)}}.\overline{G}(u)
\end{align*}
Define $y(x)=\dfrac{\overline{G}(x)}{\overline{H}(x)}$, and $z(x)=\dfrac{y(x)}{y(x+f)}$. We need to prove that $z(x)$ is decreasing in $x$. We prove that by showing $z'(x) \le 0$ as follows:
\begin{align*}
z'(x)= \frac{y'(x)y(f+x)-y'(f+x)y(x)}{y^2(f+x))}.
\end{align*}
In order to prove $z'(x) \le 0$, we can equivalently prove that $\dfrac{y'(x)}{y(x)} \le \dfrac{y'(x+f)}{y(x+f)}$. To that end it suffices to show that $\dfrac{y'(x)}{y(x)}$ is increasing in $x$ as follows:
\begin{align*}
\dfrac{y'(x)}{y(x)}=\dfrac{\dfrac{h(x)\overline{G}(x)-g(x)\overline{H}(x)}{\overline{H}^2(x)}}{\dfrac{\overline{G(x)}}{\overline{H}(x)}}=\frac{h(x)}{\overline{H}(x)} - \frac{g(x)}{\overline{G}(x)} \uparrow x.
\end{align*}
where the monotonicity come from property \ref{obs:converging}.
\end{proof}
We also prove the following lemma that will be used in proving the proposition.


\begin{lem}\label{lem:ratio}
For any $0 \le x, a$ we have: $$\dfrac{\Gbar(x+a)}{\Gbar(a)} \le \dfrac{\Hbar(x+a)}{\Hbar(a)}.$$
\end{lem}
\begin{proof}
This directly follows from the fact that $A(u)$ is a decreasing function.
\end{proof}
~\\
\noindent Now we can prove proposition \ref{pro:incr}.
\begin{proof}[Proof of proposition \ref{pro:incr}]
We need to show that $\forall x \ge 0: S_1(x) \ge S_2(x)$. We do that by investigating all possible cases depicted in figure \ref{fig:fig4}. In this figure, we have assumed that $u_2 \le u_1+f$. For the case $u_1 +f \le u_2$, the line of proof is the same.

\begin{figure}[htbp]
\centering
\includegraphics[scale=0.6]{./files/fig4}
\caption{possible cases for proposition \ref{pro:incr}}
\label{fig:fig4}
\end{figure}
\begin{itemize}
\item Case 1 ($x \le u_1$): This case is trivial as $S_1(x)=S_2(x)=\Gbar(x)$.

\item Case 2 ($u_1 \le x \le u_2$): We have $S_1(x)=\Gbar(u_1).\dfrac{\Hbar(x)}{\Hbar(u_1)}$, and $S_2(x)=\Gbar(u_1).\dfrac{\Gbar(x)}{\Gbar(u_1)}$. By lemma \ref{lem:ratio}, $\dfrac{\Gbar(x)}{\Gbar(u_1)} \le \dfrac{\Hbar(x)}{\Hbar(u_1)} $, and thus the result follows.

\item Case 3 ($u_2 \le x \le u_1+f$): We have $S_1(x)=S_1(u_2) .\dfrac{\Hbar(x)}{\Hbar(u_2)}$, and $S_2(x)=S_2(u_2) .\dfrac{\Hbar(x)}{\Hbar(u_2)}$. As  a result of case 2, we have  $S_1(u_2) \le S_1(u_2)$, and thus $S_2(x) \le S_1(x)$.
\item Case 4 ($u_1+f \le x \le u_2+f$): Consider figure \ref{fig:fig6}, and define variable $X_0$, accordingly. The random variable $X_0$ is a hypothetical random variable similar to $X(u_1)$ but with this difference that AVF's lifetime is $f_0:=u_2+f-x$. Using lemma \ref{lem:sequence}, we have $S_2(x) \le S_0$, where $S_0$ is the survival probability of random variable $X_0$ until time $x$. It suffices to show $S_0 \le S_1(x)$. We have $$S_1(x)=S_1(f_0).\dfrac{\Hbar(u_1+f)}{\Hbar(u_1+f_0)}.\dfrac{\Gbar(x)}{\Gbar(u_1+f)},$$ and 
$$S_0=S_1(f_0).\dfrac{\Gbar(u_1+f)}{\Gbar(u_1+f_0)}.\dfrac{\Gbar(x)}{\Gbar(u_1+f)}.$$
But since $\frac{\Gbar(u_1+f)}{\Gbar(u_1+f_0)} \le \frac{\Hbar(u_1+f)}{\Hbar(u_1+f_0)}$ using lemma \ref{lem:ratio}, the inequality $S_0 \le S_1(x)$ holds.
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.60]{./files/fig6}
\caption{case 4 for proposition \ref{pro:incr}}
\label{fig:fig6}
\end{figure}
\item Case 5 ($u_2+f \le x $):  We have $S_1(x)=S_1(u_2+f).\dfrac{\Gbar(x)}{\Gbar(u_2+f)}$, and $S_2(x)=S_2(u_2+f).\dfrac{\Gbar(x)}{\Gbar(u_2+f)}$. Using lemma \ref{lem:sequence} (or as a result of case 4), we have $S_2(u_2+f) \le S_1(u_2+f)$ and thus the result follows.

\end{itemize}
\end{proof}
\section{Multi-chance case}
In this section, we finally provide the proof for theorem \ref{thm:main}. We prove the result under the assumptions mentioned in the beginning of section \ref{sec:especial}. Using the same logic of proof of proposition \ref{thm:main}, we can relax these assumptions.
Before proving the result, we need to introduce some notations as follows:

\begin{itemize}
\item $t, t_0$: time
\item $u$: time to switch to AVF (decision variable) relative to $t_0$
\item $V(t,n)$: patient's remaining lifetime from time $t$ when we have $n$ remaining AVF chances
\item $S(u+f|t_0)$: probability of survival until next decision point (at $t=u+f+t_0$), conditional on survival until time $t_0$
\item $r(u|t_0)$: immediate reward (expected lifetime from $t_0$ to $u+f+t_0$), when the we switch to AVF at time $t_0+u$, and conditional on survival until time $t_0$
\item $R(u,t_0,n)$: total reward (patient's expected total lifetime from $t_0$), when the we switch to AVF at time $t_0+u$, conditional on survival until time $t_0$, and with $n$ remaining AVF chances
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.6]{./files/fig7}
\caption{Multi-chance recursive relation}
\label{fig:fig7}
\end{figure}
\end{itemize}
We can write the recursive formula as follows (see figure \ref{fig:fig7}):
\begin{align} \label{eq:val}
V(t,n)=\max_{u \ge 0} R(u,t,n)=\max_{u \ge 0} r(u|t)+S(u+f|t)V(t+u+f,n-1)
\end{align}

Now we can formally state the main theorem as follows:
\begin{thm} [multi-chance case] \label{thm:multi}
The reward function $R(u,t,n)$, defined in equation \ref{eq:val}, is decreasing in $u$.
\end{thm}
{\color{red} Note to myself: we can prove that it is decreasing in $t$ and increasing in $n$ if we desire to do so.}
\begin{cor} 
The value function is attained at $u^*=0$.
\end{cor}
\begin{proof}[Proof of theorem \ref{thm:multi}] We need to prove that for all $u_1 \le u_2$, we have $R(u_2,t,n) \le R(u_1,t,n)$.\\
In order to do that, define a third scenario similar to the case $u=u_1$ with this difference that we wait until $u_2+f$ before making the subsequent decisions, and denote the associated expected lifetime with $R_0$ (See figure \ref{fig:fig8} for an illustration.)\\
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.6]{./files/fig8}
\caption{caption}
\label{fig:fig8}
\end{figure}
We prove the result by showing the inequalities $R(u_2,t,n) \le R_0$, and $R_0 \le R(u_1,t,n)$.
\begin{proof}[Proof of $R(u_2,t,n) \le R_0$]
~\\
Define the function $y(t)$ as follows:
\begin{align*}
y(t) = \begin{cases} t & t \le u_2+f  \\ u_2+f+V(t+u_2+f,n-1) &\mbox{o.w. }  \end{cases}
\end{align*}
Note that it is a non-decreasing function. Also, note that using the notation of proposition \ref{pro:incr}, we have 
\begin{align*}
&R_0=\Ex y[X (u_1)]\\
&R(u_2,t,n)=\Ex y[X (u_2)]
\end{align*}
Since $X(u_2) \le _{st} X(u_1)$ (based on proposition \ref{pro:incr}), and $y(t)$ is a non-decreasing function, we have $$R(u_2,t,n)=\Ex y[X (u_2)] \le \Ex y[X (u_1)]=R_0 .$$
\end{proof}
\begin{proof}[Proof of $R_0 \le R(u_1,t,n)$]
~\\
Let $u^*_2$ be the maximizer of the function $R(u,t+u_2+f,n-1)$, or in other words $$V(t+u_2+f,n-1)=R(u^*_2,t+u_2+f,n-1).$$
Note that we have 
$$R(u_1,t,n)- R_0=S(u_1+f|t)\left[V(t+u_1+f,n-1) -R(\Delta u+u^*_2,t+u_1+f,n-1)\right].$$
Also, note that $ R(\Delta u+u^*_2,t+u_1+f,n-1)\le V(t+u_1+f,n-1)$ based on definition of $V$. This establishes the result.
\end{proof}

\end{proof}
\newpage
\bibliography{refs}
\newpage
is this true?
\begin{lem}\label{lem:cond}
Consider random variables $X,Y$ such that $X \le_{st} Y$. Then for all $a$, we have that $$[X | X \ge a] \le_{st} [Y | Y \ge a].$$
\end{lem}
\end{document}
